﻿using EventSubscriptionExample;
using Interview.Model.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Interview.Model.ExaminationQuestions2
{
    public class ElectricLight : ElectricalBase
    {

        public ElectricLight() : base("电灯") { }

        public event EventHandler<ElectricalStatusEventArgs> StatusChanged;

        public override void TurnOff()
        {
            this.Status = ElectricalStatusEnum.Off;
            Console.WriteLine($"{Name} 断电了，关灯了!");
        }

        public override void TurnOn()
        {
            this.Status = ElectricalStatusEnum.Working;
            Console.WriteLine($"{Name} 通电了，开始照明...");
        }
    }
}
